<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="./css/api.css" rel="stylesheet"/>
  <link href="./css/element.css" rel="stylesheet"/>
  <link href="./css/base.css" rel="stylesheet"/>
  <title>人才管理</title>
  <style>
    .el-input__inner{
      border: none;
      background-color: #EFEFEF;
      border-radius: 3rem;
      font-size: .8rem;
    }.el-input__prefix{

    }
  </style>
</head>
<body>
  <div id="vm" v-cloak>
    <div class="x-talent-search">
      <div><i class="el-icon-arrow-left x-closewin-icon" @click="closethiswin"></i></div>
      <div class="x-tase-l">
        <el-input placeholder="请输入姓名、手机号、岗位" prefix-icon="el-icon-search" v-model="search"></el-input>
      </div>
      <div class="x-tase-r"><span class="x-tab1-aicon"></span>大连地区</div>
    </div>
  </div>
  <script type="text/javascript" src="./script/vue.js"></script>
  <script type="text/javascript" src="./script/element.js"></script>
  <script type="text/javascript" src="./script/api.js"></script>
  <script type="text/javascript" src="./js/base.js"></script>
  <script>
    apiready = function () {
      var isforwhere = api.pageParam.id;
      console.log(isforwhere);

      //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          search:'',
        }
      },
      created:function() {
        var that=this;

      },
      mounted:function(){
        var that=this;
        that.opennavframe('0')
      },
      methods: {
        setnaviga:function(frameGroupIndex){
          var NVNavigationBar = api.require('NVNavigationBar');
          NVNavigationBar.open({
              rect: {
                    x: 0,
                    y: 90,
                    w: api.frameWidth,
                    h: 44
              },
              styles: {
                  orientation: 'horizontal',
                  bg: '#fff',
                  bgAlpha: 1,
                  font: {
                      size: 16,
                      sizeSelected: 18,
                      color: '#929292',
                      colorSelected: '#474747',
                      bold:true
                  },
                  itemSize: {
                      w: api.frameWidth/5,
                      h: 44
                  }
              },
              items: [{
                  title: '待入职',
                  bgSelected:'widget://images/line.png',
                  bg: '#fff'
              }, {
                  title: '复试',
                  bg: '#fff',
                  bgSelected:'widget://images/line.png'
              }, {
                  title: '留存',
                  bgSelected:'widget://images/line.png',
                  bg: '#fff'
              }, {
                  title: '未通过',
                  bg: '#fff',
                  bgSelected:'widget://images/line.png'
              }, {
                  title: '在职管理',
                  bgSelected:'widget://images/line.png',
                  bg: '#fff'
              }],
              selectedIndex: frameGroupIndex,
              fixedOn: api.frameName,
              fixed: true,
              id: 'first'
          }, function(ret, err) {
              // console.log("ret"+JSON.stringify(ret))
              // console.log("nav的高度"+$api.dom('nav').offsetHeight)
              if (ret.eventType == 'click') {
                api.setFrameGroupIndex({
                    name: "opentalentmanagement",
                    index: ret.index,
                    scroll: true
                });
              }
          });
        },
        opennavframe:function(frameIndex){
          var that = this;
            api.openFrameGroup({
                name: 'opentalentmanagement',
                background: '#fff',
                rect: {
                    x:0,
                    y:135,
                    w: api.winWidth,
           				  h: 'auto'
                },
                frames: [{
                    name: 'talentma1',
                    url: 'talentma1.html',
                    bgColor: '#fff',
                    bounces:false
                }, {
                    name: 'talentma2',
                    url: 'talentma2.html',
                    bgColor: '#fff',
                    bounces:false
                }, {
                    name: 'talentma3',
                    url: 'talentma3.html',
                    bgColor: '#fff',
                    bounces:true,
    	              pageParam:{
      					      opentype:"xdk"
      	            }
                },{
                    name: 'talentma4',
                    url: 'talentma4.html',
                    bgColor: '#fff',
                    bounces:false
                }, {
                    name: 'talentma5',
                    url: 'talentma5.html',
                    bgColor: '#fff',
                    bounces:false
                }],
                preload:2,
                index:frameIndex
                // scrollEnabled:false//滑动
            }, function(ret, err) {
                // console.log("openFrameGroup的ret"+JSON.stringify(ret))
                var index = ret.index;
                if(ret){
                  that.setnaviga(index);
                }
            });
        },
      }
    })
    }
  </script>
</body>
</html>
